-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix: Fixed issue where soft link details were misaligned in git repos #16593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I have created 2 interfaces and substituted in place of GitItem, fixes the alignment issue but unable to get the icon property. Need some help to figure it out. |
|
Thank you for your PR! We use public sealed class GitShortcutItem : ShortcutItem, GitItem {}
Just like this: if (isSymLink)
{
if (isGitRepo) { return new() { ... }; }
else { return new() { ... }; }
} |
|
|
Seal was added for IL compiler performance aspects, you can remove any time you want. |
Okay. Understood, thank you. Will do today. |
|
You don't need interfaces you introduced. |
I won't be able to inherit ShortcutItem and GitItem together. That's why I used interfaces. |
|
Ahh you're absolutely right, I forgot that. Can you change "is/as ShortcutItem" to IShortcutItem in everywhere as well in that case? Then you dint have to inherit ShortcutItem and GitItem but should inherit these two interfaces. |
Sure thing I'll carefully substitute IShortcutItem in the place of ShortcutItem. |
|
I have replaced all "Is Shortcut" Item with interface so that it checks for the interface properties, I have not changes "as ShortcutItem" because it might want to actually create an Instance of the class rather than the Interface as the ShortcutItem is being derived from ListedItem class also. |
I've made the commits! :) |
yaira2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.